import {Popconfirm} from 'antd';
import Static from './Static'


const DeleteAlert = ({onClick, title, label, color, hover, display, marginLeft}) => (
    !display
        ? <Popconfirm placement="top" title={title || '确认删除吗？'} onConfirm={onClick} okText="确定" cancelText="取消">
            <Static label={label || '删除'}
                    color={color || 'red'}
                    hover={hover || '#e40b0bc2'}
                    fontSize='.875rem'
                    style={{marginLeft: marginLeft || '1rem'}}
            />
        </Popconfirm>
        : <div/>
)

export default DeleteAlert